home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 9
/
64er_Magazin_Sonderheft_09_86-09_1986_Markt__Technik_de_Side_A.d64
/
catalog printer+
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
107 lines
5 goto 20
10 a$="catalog printer+":open1,8,15,"s:"+a$:close1:save a$,8:end
11 'capri + file printer aus 64'er sonder2/86 s.111 / 29.5.86 / kd
12 'capri by herbert kaufhold, auf den stoecken 17a, 4040 neuss 22
13 'file printer by klaus grabietz, am weinberg 14, 3108 winsen
14 ' 64 -ersion
15 :
20 poke 53280,0:poke 53281,11:print "[147][159]"chr$(14)
30 close4:open4,4,0:close4
40 if st and-64 then print,"[196]rucker einschalten[145]":goto 30
50 :
60 s=704:dj=86:rem dj=jahr
70 c$=chr$(13):e$=chr$(27):o$=chr$(0):gosub 930:poke s+3,dj:poke 198,0
90 :
100 print"[147]"," [196]irectory [208]rinter
110 [153]" (NULL)aechste str$iskette - 'asc7'wait oder (NULL)val(NULL)(NULL)(NULL)(NULL)
120 if w=64 then print" [196]ruck wiederholen - '[198]5'"
130 print,"validieren - '[198]3'"
140 print," [197]nde - '[198]1'"
150 wait 198,1:get a$:as=asc(a$):poke 198,0:if as=135 and w<>64 then as=0
160 if as=136 and w=64 then gosub 300:goto 100
170 if as=13 then as=136
180 on as+132*(as>132) gosub 3000,1020,600,200:goto 100
190 :
200 dj=peek(s+3):dj$=mid$(str$(dj),2)
210 gosub 800:if d3$<>dj$ then d$="ttmm"+dj$
220 print"[153][212]agesdatum :"d$c$"[145]"spc(11);
230 inputd$:if right$(d$,2)<>dj$then220
240 if d$=da$ then300
250 poke s,val(mid$(d$,1,2)):poke s+1,val(mid$(d$,3,2))
260 poke s+2,val(mid$(d$,5,2)):gosub 800:rem datum
270 :
290 rem=== block's free / dir-name
300 w=0:n=0:cc$="":print"[147][153]";:gosub 1000:if de=21 then gosub 2100:goto 510
310 open2,8,2,"#":get#2,a$:p=asc(a$+o$)+3
320 print#15,"m-r"chr$(250)chr$(2):get#15,bl$
330 print#15,"m-r"chr$(252)chr$(2):get#15,bh$:bf=asc(bl$+o$)+256*asc(bh$+o$)
340 sp=18:se=0:gosub870:bf$=right$(" "+str$(bf),4)
350 print#15,"m-r"chr$(144)chr$(7)chr$(23)
360 a$="":cc$="":input#15,a$:cc$=left$(a$,16):id$=mid$(a$,19,2)
365 :
370 sp=18:se=1:print"[147]"," "dd$c$," "cc$"[146] "id$
380 :
390 rem=== dir lesen
400 gosub870:if ed=10 then500
410 for di=0 to 7:pz=di*32:print#15,"b-p 2";pz+2:gosub 2000:rem err
420 : if de then ed=10:di=10
430 : get#2,a$:a=asc(a$+o$):b=a-(a and128):if a=0 then490:rem geloescht
435 : if b>64 then b=b-60
440 : print#15,"m-r"chr$(pz+5)chr$(p)chr$(16):input#15,f$:if len(f$)=16 then470
450 : print#15,"m-r"chr$(pz+5)chr$(p)chr$(16)
460 : f$="":fori=1 to 16:get#15,a$:f$=f$+a$:next
470 : print#15,"b-p 2";pz+30:get#2,bl$:get#2,bh$:bl=asc(bh$+o$)*256+asc(bl$+o$)
480 : n=n+1:f$(n)=right$(" "+str$(bl),4)+" "+f$+" "+b$(b):print" "f$(n)
490 next:if ed=0 then400
500 printc$" "bf$" bloecke frei.
510 [160]15:[160]2
520 :
590 [143]=== print
600 [139] cc$[178]"" [167] [142]
610 f[178]128:[159] f,4,1:[152]f:[157] f:[153] e$"(NULL)";
620 [153] e$"(NULL)"e$[199](15)e$"s"o$e$"a"[199](5)e$"-1name : "cc$" right$str$: "id$" ";
630 [152]f,bf$" bloecke frei. (NULL)tand vom: "dd$" "e$"-0":[152]f
640 [139] w [167]670
650 b[178]n[173]3:b%[178]b:[139] n[178]0 [167]710
660 [139] b[179][177]b% [167] [129] x[178]1 [164] 3:f$(n[170]x)[178]"":[130]:n[178]n[170]3
670 b%[178]n[173]3:[129] x[178]1 [164] b%
680 : [152]f,f$(x)" "f$(x[170]b%)" "f$(x[170]2[172]b%)
690 [130]
700 :
710 w[178]64:[160] f:[153]"loadopen"[199](14):[142]
720 :
790 [143]=== subroutine
800 d1$[178][201]("0"[170][202]([196]([194](s)),2),2)
810 d2$[178][201]("0"[170][202]([196]([194](s[170]1)),2),2)
820 d3$[178][201]("0"[170][202]([196]([194](s[170]2)),2),2):dd$[178]d1$[170]"."[170]d2$[170]"."[170]d3$
830 d$[178]d1$[170]d2$[170]d3$:da$[178]d$:[142]
840 :
850 [143]" block read
860 ed=10:goto 900
870 print#15,"u1 2 0";sp;se:gosub 2000:if de then print"zeile 870":goto 860
880 ed=0:get#2,sp$:get#2,se$:sp=asc(sp$+o$):se=asc(se$+o$)
890 if sp=0 or sp>35 or se>20 then ed=1
900 return
910 :
920 rem" initialisieren
930 j[178]0:i[178]0:di[178]0:pz[178]0:se[178]0:a[178]0:b[178]0:bl[178]0:bf[178]0:w[178]0
940 b$(0)[178]" ":b$(1)[178]"seq ":b$(2)[178]"prg ":b$(3)[178]"usr ":b$(4)[178]"rel "
950 b$(5)[178]"seq<":b$(6)[178]"prg<":b$(7)[178]"usr<":b$(8)[178]"rel<"
960 [134] f$(152)
970 [142]
980 :
990 [143]" disk-anw.
1000 open15,8,15,"i0":gosub 2000:return
1010 :
1020 open15,8,15,"v0":gosub 2000:return
1030 :
1990 rem" disk-err
2000 [132]15,de,de$,s1,s2
2010 [139] de [167] [153]""de;de$,s1;s2
2020 [142]
2030 :
2100 [153],"disk error #"de;c$"weiter mit: (NULL)atn(NULL)(NULL)val
2110 poke198,0:wait198,1:return
2990 rem=== ende
3000 print"[147]":close15:end